package x.x.x;

import java.util.Calendar;
import java.util.Date;

public class DateGetYearMonthDay {

    /**
     * 方法目的:测试由日期获得年月日
     * 
     *@author hanxy17
     * 如修改方法体请自行修改作者信息
     * 当前作者只对自己编写内容负责
     *
     * @param args
     */
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        Integer year = calendar.get(Calendar.YEAR);
        Integer month = calendar.get(Calendar.MONTH)+1;
        Integer day = calendar.get(Calendar.DAY_OF_MONTH);
        System.err.println(year+"\t"+month+"\t"+day);
        

    }

}
